package com.zhao.service.test;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.zhao.service.search.LuceneService;
import com.zhao.test.UnitTesting;

public class LuceneRunnerTesting extends UnitTesting {

	@Autowired
	LuceneService luceneService;

	@Test
	public void contextLoads() {

	}

	@Test
	public void testLucene() {
		try {
			for (int i = 1; i <= 100; i++) {
				luceneService.addIndex("index" + i, i + "");
			}
			luceneService.searchIndex("abc");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
